import ReactDOM from "react-dom/client";
import { Provider } from "react-redux";
import App from "./App";
import store from "./redux/store";

ReactDOM.createRoot(document.getElementById("root")).render(
    <Provider store={store}>
        <App />
    </Provider>
);

/**
 * 监测 redux 中状态的改变，如果 redux 中的状态发生了改变，那么重新渲染 App 组件
 */
// store.subscribe(() => {
//     root.render(<App />);
// });
